//
//  TSCMyDatePicker.h
//  Tsc_IOS
//
//  Created by Rio on 15-10-06.
//  Copyright (c) 2015年 idream. All rights reserved.
//

typedef void(^BTSCMyDatePickerButtonClickedListener)(UIButton *, NSDate *); // 点击按钮时的回调

#import <UIKit/UIKit.h>
#import "TSCSDK.h"

@interface TSCMyDatePicker : UIView

@property (weak, nonatomic) IBOutlet UIDatePicker *datePicker;
@property (weak, nonatomic) IBOutlet UIButton *btnConfirm;
@property (weak, nonatomic) IBOutlet UIButton *btnCancel;
@property (weak, nonatomic) IBOutlet UIButton *btnNoSelect;

@property (nonatomic, assign) UIDatePickerMode datePickerMode;
@property (nonatomic, strong) NSDate * initialDate; // 初始时的日期
@property (nonatomic, strong) NSDate * minimumDate;
@property (nonatomic, strong) NSDate * maximumDate;

@property (nonatomic, strong) NSDate * selectedDate; // 如果为nil，表示什么日期都没有选；如果不为nil，表示选择了一个日期

@property (nonatomic, strong) BTSCMyDatePickerButtonClickedListener btnClickedListenerConfirm;
@property (nonatomic, strong) BTSCMyDatePickerButtonClickedListener btnClickedListenerCancel;
@property (nonatomic, strong) BTSCMyDatePickerButtonClickedListener btnClickedListenerNoSelect;

+ (TSCMyDatePicker *) loadFromXib;

@end
